package com.zx.idc.backend.gui.scheduler.base.entire;

import com.zx.idc.backend.gui.api.management.basicdata.report.IdcBasicMonitorDataReportService;
import com.zx.idc.backend.gui.common.anno.GlobalJob;
import com.zx.idc.common.spring.SpringBeanUtil;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * 基础数据监测记录上报job
 * @author rxliuli
 */
@GlobalJob
public class BaseMonitorDataJobEntire implements Job {

    private static final Logger LOG = LoggerFactory.getLogger(BaseMonitorDataJobEntire.class);

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        LOG.info("基础数据监测数据上报Job 开始运行...");
        try {
            final IdcBasicMonitorDataReportService service = SpringBeanUtil.getBean(IdcBasicMonitorDataReportService.class);
            service.activeReport();
        }catch (Exception e){
            LOG.error(e.getMessage(), e);
        }
        LOG.info("基础数据监测数据上报Job运行结束。");
    }

}
